<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateLogTable extends Migration
{

    /**
     * 操作日志表
     */
    public function up()
    {
        Schema::create('log', function (Blueprint $table) {
            $table->increments('id');
            $table->string('name', 60)->comment("操作人姓名");
            $table->string('username', 160)->comment("管理员姓名");
            $table->string('content', 160)->comment("操作内容");
            $table->string('ip', 60)->comment("操作ip");
            $table->string("region", 160)->comment("操作地区");
            $table->timestamps();
        });
    }

    public function down()
    {
        Schema::dropIfExists('log');
    }
}
